<template >
  <div>
     <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="currentPage"
      :page-sizes="[5]"
      :page-size="size"
      layout="total, sizes, prev, pager, next, jumper"
      :total="total">
    </el-pagination>
  </div>
</template>
<script>
// props  $emit
export default {
  props: {
    size: {
      type: Number,
      default: 5 
    },
    total: {
      type: Number
    },
    currentPage: {
      type: Number,
      default: 1
    }
  },
  methods: {
    handleSizeChange(size) {
      this.$emit('handleSizeChange',size) 
    },
    handleCurrentChange(val) {
      this.$emit('handleCurrentChange', val)
    }
  },
}
</script>